{yun:}include file="$wapstyle/fheader.htm"{/yun}
<link rel="stylesheet" href="{yun:}$config_wapdomain{/yun}/js/mui/css/mui.picker.min.css?v={yun:}$config.cachecode{/yun}" type="text/css" />
<script src="{yun:}$wap_style{/yun}/js/compress.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<script src="{yun:}$wap_style{/yun}/js/exif.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<link rel="stylesheet" href="{yun:}$config.sy_weburl{/yun}/app/template/wap/css/style.css?v={yun:}$config.cachecode{/yun}" type="text/css" />

<div id="app" class="mui-views">
    <div class="mui-view">
        <div class="mui-pages"></div>
    </div>
</div>
<!--页面主结构结束-->
<!--单页面开始-->
<div id="main" class="mui-page">
    <!--页面主内容区开始-->
    <div class="mui-page-content">
        <div class="mui-scroll-wrapper">
            <div class="mui-scroll">
                <div class="pay_choice_box">
                    <form action="" method="post" onsubmit="return order_form();" id="paymentform">
                        <div class="pay_xymoney">
                            <span class="pay_xymoney_name">订单号</span>
                            <div class="pay_xymoney_t"><em class="">{yun:}$order.order_id{/yun}</em></div>
                        </div>
                        <div class="pay_xymoney">
                            <span class="pay_xymoney_name">支付金额</span>
                            <div class="pay_xymoney_t"><em class="pay_xymoney_t_n"><span id="price">{yun:}$order.order_price{/yun}</span></em> 元</div>
                        </div>
                        <div class="pay_xymoney">
                            <span class="pay_xymoney_name">订单类型</span>
                            <div class="pay_xymoney_t">
                                <em class="">
				            		{yun:}if $order.type==29{/yun}发布供求任务{yun:}elseif $order.type==30{/yun}刷新供求任务{yun:}/if{/yun}
				            	</em>
                            </div>
                        </div>

                        <div class="member_set_meal_fk_fbox mt10">
                            {yun:}if $config.wxpay==1{/yun}

                            <div class="member_set_meal_fk_fs member_set_meal_fk_fs_wx" onclick="paycheck('wxpay');">
                                <i class="wxpay member_set_meal_fk_xz"></i>微信支付
                            </div>
                            {yun:}/if{/yun} {yun:}if $config.alipay==1{/yun}
                            <div class="member_set_meal_fk_fs member_set_meal_fk_fs_zfb" onclick="paycheck('alipay');">
                                <i class="alipay member_set_meal_fk_xz"></i>支付宝
                            </div>
                            {yun:}/if{/yun}

                        </div>
                        <input type="hidden" value="" id="paytype" name="paytype" />
                        <input type="hidden" value="{yun:}$order.order_price{/yun}" id="order_price" name="price" /> {yun:}if $config.wxpay==1 || $config.alipay==1{/yun}
                        <div class="member_set_meal_fk_zf">
                            <input type="submit" class="member_set_meal_fk_zf_bth" value="确认支付">
                        </div>
                        {yun:}else{/yun}
                       <div class="pay_zfgb_tip">
                            <span>网站已关闭支付功能，请联系管理员！</span>
                        </div>
                        {yun:}/if{/yun}

                    </form>
                </div>
            </div>
        </div>
    </div>
    <!--页面主内容区结束-->
</div>

 
<script src="{yun:}$config_wapdomain{/yun}/js/mui/mui.picker.min.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<script src="{yun:}$config_wapdomain{/yun}/js/mui/mui.view.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>

 
<script language="javascript">
    mui.init();
    var viewApi = mui('#app').view({
        defaultPage: '#main'
    });
    //初始化单页的区域滚动
    mui('.mui-scroll-wrapper').scroll();
    var view = viewApi.view;
    (function($) {
        //处理view的后退与webview后退
        var oldBack = $.back;
        $.back = function() {
            if(viewApi.canBack()) { //如果view可以后退，则执行view的后退
                viewApi.back();
            } else { //执行webview后退
                oldBack();
            }
        };

    })(mui);
	$(document).ready(function() {
		if(document.getElementById('main')){
			document.getElementById('main').addEventListener('touchmove', function (e) { e.preventDefault();}, {passive: false});
		}
	})
    function order_form() {
        var paytype = $('#paytype').val();
        if(paytype == "") {
            layermsg('请选择一种支付方式！', 2);
            return false;
        } else if(paytype == 'wxpay') {
            $("#paymentform").attr("action", "index.php?c=free&a=wxpay&id={yun:}$order.id{/yun}");
        } else if(paytype == 'alipay') {
            $("#paymentform").attr("action", "{yun:}$config.sy_weburl{/yun}/api/wapalipay/alipayto_fast.php?dingdan={yun:}$order.order_id{/yun}&dingdanname={yun:}$order.order_id{/yun}&alimoney={yun:}$order.order_price{/yun}");
        }
    }
     function paycheck(type) {
      var type;
    if(type == "wxpay") {
      $(".wxpay").addClass("member_set_meal_fk_xz_cur");
      $(".alipay").removeClass("member_set_meal_fk_xz_cur");
      $(".bank").removeClass("member_set_meal_fk_xz_cur");
      $("#paytype").val('wxpay');
      $(".paybank").hide();
      $("#div_coupon").show();
      $("#paymentform").attr("action",wapurl+ "index.php?c=free&a=dingdan");
    } else if(type == "alipay") {
      $(".alipay").addClass("member_set_meal_fk_xz_cur");
      $(".wxpay").removeClass("member_set_meal_fk_xz_cur");
      $(".bank").removeClass("member_set_meal_fk_xz_cur");
      $("#paytype").val('alipay');
      $(".paybank").hide();
      $("#div_coupon").show();
      $("#paymentform").attr("action",wapurl+ "index.php?c=free&a=dingdan");
    }
    }
</script>
{yun:}include file="$wapstyle/footer.htm"{/yun}